1. Field of the Invention
The present invention relates to a nonvolatile memory controller for controlling a nonvolatile memory such as a flash memory, and to a nonvolatile storage device using such nonvolatile memory controller.
2. Description of the Background Art
In recent years, as a nonvolatile storage device equipped with a NAND-type flash memory as a rewritable nonvolatile memory, memory cards are being used as the storage medium of digital cameras and mobile phones, and its market is expanding.
Moreover, pursuant to the yearly reduction in the bit unit price, nonvolatile storage devices are being used as an inexpensive storage device in markets other than memory cards; for example, as memories of SSD (Solid State Drive) used as a substitute of HDD (Hard Disk Drive), and its application is expanding.
A memory cell of the foregoing flash memory takes on a configuration of the floating gate retaining, in a nonvolatile manner, electrons between a control gate and a substrate in a MOS (Metal Oxide Semiconductor)-type transistor, and performs the erasure and writing of data by shifting the electrons between the substrate and the floating gate. Moreover, data is read from the memory cell of the flash memory by determining the amount of current that flows through the transistor configuring the flash memory.
As described above, since the erasure and writing of data are repeated to the memory cell of the flash memory, the electrons move between the substrate and the floating gate, and this causes the degradation of the insulator film (hereinafter referred to as the “gate insulator film”) between the substrate and the floating gate. When the gate insulator film becomes degraded, electrons are leaked from the floating gate to the substrate via the defects existing in the gate insulator film, the writing efficiency deteriorates due to the influence of the electrons trapped in the defects of the gate insulator film, and this consequently causes defects in the erasure and writing of data.
A block that is subject to the foregoing erasure or writing error is referred to as a defective block, but the existence of defective blocks in the flash memory is unavoidable. When a defective block occurs, the controller controlling the flash memory needs to save the data in the defective block to another normal block, and perform control so that the erasure and writing of new data is not performed to the defective block.
Moreover, as another conventional technology, Japanese Patent Application Publication No. 2002-197890 discloses processing to be performed when a defective block occurs in a flash memory.
As described above, since a flash memory contains defective blocks, a memory card needs to notify the host device that it only has a capacity that is less than the capacity of the flash memory mounted in the memory card. For example, the effective capacity of a memory card or a USB flash with a capacity of 1 GB actually distributed in the market is smaller than 1 GB.
Although the effective capacity of a memory card is decided upon anticipating the existence and occurrence of defective blocks in advance as described above, if numerous defective blocks occur as a result of repeating the rewriting of data, it becomes impossible to maintain the effective capacity that was notified to the host device to which the memory card is connected, and there is a problem in that writing can no longer be performed.